home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / grafica / pvrgjpeg / stream.h < prev    next >
C/C++ Source or Header  |  1999-01-01  |  2KB  |  39 lines

  1. /*************************************************************
  2. Copyright (C) 1990, 1991, 1993 Andy C. Hung, all rights reserved.
  3. PUBLIC DOMAIN LICENSE: Stanford University Portable Video Research
  4. Group. If you use this software, you agree to the following: This
  5. program package is purely experimental, and is licensed "as is".
  6. Permission is granted to use, modify, and distribute this program
  7. without charge for any purpose, provided this license/ disclaimer
  8. notice appears in the copies.  No warranty or maintenance is given,
  9. either expressed or implied.  In no event shall the author(s) be
  10. liable to you or a third party for any special, incidental,
  11. consequential, or other damages, arising out of the use or inability
  12. to use the program for any purpose (or the loss of data), even if we
  13. have been advised of such possibilities.  Any public reference or
  14. advertisement of this source code should refer to it as the Portable
  15. Video Research Group (PVRG) code, and not by any author(s) (or
  16. Stanford University) name.
  17. *************************************************************/
  18.  
  19. /*
  20. ************************************************************
  21. stream.h
  22.  
  23. This file contains simple macros for better access to the direct
  24. stream.
  25.  
  26. ************************************************************
  27. */
  28.  
  29. #ifndef STREAM_DONE
  30. #define STREAM_DONE
  31.  
  32. #define bputw(word) {bputc((word>>8)&0xff); bputc(word&0xff);}
  33. #define bputn(nybbleh,nybblel) {bputc(((nybbleh&0x0f)<<4)|(nybblel&0x0f));}
  34. #define hinyb(val) ((val>>4)&0x0f)
  35. #define lonyb(val) (val & 0x0f)
  36.  
  37. #endif
  38.  
  39.